﻿/*******************************************************************************
 * AAEngine
 * Copyright (c) 2010 Mike Jarosch
 *
 * Original source PushButton Engine:
 * Copyright (C) 2009 PushButton Labs, LLC
 * For more information see http://www.pushbuttonengine.com
 *
 * This file is licensed under the terms of the MIT license, which is included
 * in the "MIT License.txt" file at the root directory of this SDK.
 ******************************************************************************/

using Microsoft.Xna.Framework.Audio;

namespace AAEngine.Engine.Resources
{
    public class SoundResource : Resource
    {
        private SoundEffect _sound;

        public override void Initialize(object data)
        {
            base.Initialize(data);

            _sound = (SoundEffect)data;
        }

        public override void Dispose()
        {
            base.Dispose();

            if (_sound != null)
            {
                _sound.Dispose();
                _sound = null;
            }
        }

        public SoundEffect Sound
        {
            get { return _sound; }
        }
    }
}
